package com.classmate.message;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ListView;

import com.classmate.main.R;

public class MessageListActivity extends Activity {
	Button closeBtn;
	Button write_Btn;
	Button read_Btn;
	ListView listview;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.message_list);
		
		closeBtn = (Button)findViewById(R.id.msgList_closeBtn);
		write_Btn = (Button)findViewById(R.id.msgList_writeBtn);
		read_Btn=(Button)findViewById(R.id.msgList_readBtn);
		listview=(ListView)findViewById(R.id.msgListLV);
		
		write_Btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent i=new Intent();
				i.setClass(getApplicationContext(), MessageWriteActivity.class);
				startActivity(i);
			}
		});
		
		read_Btn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent i=new Intent();
				i.setClass(getApplicationContext(), MessageReadActivity.class);
				startActivity(i);
			}
		});
		
	}

	 
	
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.message_list, menu);
		return true;
	}

}
